#!
$FileName = "files\\file.txt";
open(MYFILE,$FileName)||die "Can not open $FileName: $!";
print "get file content line by line!\n";
while(<MYFILE>)
{
	print $_;
}
close MYFILE;

print "\nGet file content once!\n";
open(MYFILE,$FileName)||die "Can not open $FileName: $!";
@contents = <MYFILE> ;
print join ("-",@contents);
close MYFILE;